package com.xbongbong.paas.lowcode;

import com.xbongbong.paas.pojo.ButtonPojo;
import com.xbongbong.paas.pojo.WorkFlowPojo;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.UserVO;
import com.xbongbong.pro.custombutton.pojo.dto.CustomButtonListDTO;
import com.xbongbong.pro.custombutton.pojo.dto.CustomButtonSaveDTO;
import com.xbongbong.pro.custombutton.pojo.vo.CustomButtonListVO;
import com.xbongbong.pro.custombutton.pojo.vo.CustomButtonSaveVO;

import java.util.List;

/**
 * @author 吴峰
 * @date 2021/03/04 21:25
 */
public interface CustomButtonService {

    /**
     * 自定义按钮获取
     * @param customButtonListDTO
     * @return com.xbongbong.pro.custombutton.pojo.vo.CustomButtonListVO
     * @author 吴峰
     * @date 2021/3/5 11:08
     * @throws XbbException
     */
    CustomButtonListVO list(CustomButtonListDTO customButtonListDTO) throws XbbException;

    /**
     * 新建
     * @param customButtonSaveDTO
     * @return com.xbongbong.pro.custombutton.pojo.vo.CustomButtonSaveVO
     * @author 吴峰
     * @date 2021/3/5 14:20
     * @throws XbbException
     */
    CustomButtonSaveVO add(CustomButtonSaveDTO customButtonSaveDTO) throws XbbException;
    /**
     * 自定义按钮获取
     * @param customButtonListDTO
     * @return com.xbongbong.pro.custombutton.pojo.vo.CustomButtonListVO
     * @author 吴峰
     * @date 2021/3/5 11:08
     * @throws XbbException
     */
    CustomButtonListVO listByPermission(CustomButtonListDTO customButtonListDTO) throws XbbException;

    List<WorkFlowPojo> getButtonList(Integer businessType, Long formId, Integer saasMark, String corpid, UserVO userVO, Integer type) throws XbbException;

    /**
     * 列表页按钮获取
     * @param businessType
     * @param subBusinessType
     * @param formId
     * @param saasMark
     * @param corpid
     * @param userVO
     * @param type
     * @return
     * @throws XbbException
     */
    List<ButtonPojo> getLowCodeButtonList(Integer businessType, Integer subBusinessType, Long formId, Integer saasMark, String corpid, UserVO userVO, Integer type) throws XbbException;
}
